﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConvertDocument.aspx.cs" Inherits="SP2010WordAutomation.UI.Layouts.SP2010WordAutomation.UI.ConvertDocument" DynamicMasterPageFile="~masterurl/default.master" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="/_controltemplates/InputFormSection.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="/_controltemplates/InputFormControl.ascx" %> 
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="/_controltemplates/ButtonSection.ascx" %> 

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
    <script type="text/javascript"> 

        function BtnConvertDocumentCancel_Click() { 
           SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.cancel, 'Operation Cancelled'); 
        } 
    </script>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <table 
     id="maintable" 
     border="0" 
     cellspacing="0" 
     cellpadding="0" 
     class="ms-propertysheet" 
     width="100%" 
    > 
      <wssuc:InputFormSection Title="Conversion parameters" runat="server"> 
        <Template_Description> 
          <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" 
                                       text="Define conversion parameters." EncodeMethod='HtmlEncode'/> 
        </Template_Description> 
        <Template_InputFormControls> 
          <wssuc:InputFormControl runat="server"> 
            <Template_Control>
                <strong>Output Format:</strong><br />
                <asp:dropdownlist id="ddlOutputFormat" runat="server">
                    <asp:ListItem Value="1">Open XML (docx)</asp:ListItem>
                    <asp:ListItem Value="3">Word 97 (doc)</asp:ListItem>
                    <asp:ListItem Value="8" Selected="True">PDF</asp:ListItem>
                    <asp:ListItem Value="9">RTF</asp:ListItem>                    
                    <asp:ListItem Value="11">XPS</asp:ListItem>
                </asp:dropdownlist>
                <br /><br />
                <strong>Output Library:</strong><br />
                <asp:dropdownlist id="ddlOutputLibrary" runat="server"/>
                <br /><br />
                <strong>Save behaviour:</strong><br />
                <asp:dropdownlist id="ddlSaveBehaviour" runat="server">
                    <asp:ListItem Value="0">Append to version history if possible, otherwise overwrite</asp:ListItem>
                    <asp:ListItem Value="1">Always overwrite</asp:ListItem>
                    <asp:ListItem Value="2">Append to version history if possible, otherwise fail</asp:ListItem>
                    <asp:ListItem Value="3">Never overwrite/append</asp:ListItem>
                </asp:dropdownlist>
            </Template_Control> 
          </wssuc:InputFormControl> 
        </Template_InputFormControls> 
      </wssuc:InputFormSection> 
      <wssuc:ButtonSection runat="server" ShowStandardCancelButton="False"> 
        <Template_Buttons> 
          <asp:placeholder ID="Placeholder1" runat="server"> 
              <asp:Button CssClass="ms-ButtonHeightWidth" ID="btnOk" runat="server" text="Ok" />
                <SeparatorHtml> 
                    <span id="idSpace" class="ms-SpaceBetButtons" /> 
                </SeparatorHtml> 
              <input class="ms-ButtonHeightWidth" type="button" name="BtnCancel" id="Button2" 
                                value="Cancel" onclick="BtnConvertDocumentCancel_Click()" />            
          </asp:PlaceHolder> 
        </Template_Buttons> 
      </wssuc:ButtonSection> 
    </table>
    <asp:Label ID="lblMessages" runat="server" style="color: #ff0000; display: block;"></asp:Label>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Convert Document
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Convert Document
</asp:Content>
